from Autotests.BaseTest import AirClientTestCase
from Autotests.LocalMachine.Pages.AirClient.OptionsPage.GeneralTab import SchedulePeriodicity
from Autotests.LocalMachine.Pages.AirClient.OptionsPage.GeneralTab import GeneralTab


class OptionsGeneralTest(AirClientTestCase):
    def test_SetGeneralOptions(self):
        self.generalTab = GeneralTab()
        testSettings = ('mailaddress@gg.com', True, SchedulePeriodicity.never)
        self.defaultGeneralSettings = self.generalTab.getGeneralSettings()
        self.generalTab.setGeneralSettings(*testSettings)
        self.assertEqual(self.generalTab.getGeneralSettings(), testSettings, "General settings were set incorrectly")

    def tearDownImpl(self):
        self.generalTab.setGeneralSettings(*self.defaultGeneralSettings)

import unittest
if __name__ == "__main__":
    unittest.main()